package com.students.service;

import com.students.pojo.Admins;
import com.baomidou.mybatisplus.extension.service.IService;
import com.students.pojo.RespBean;
import com.students.pojo.Role;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author caohanqing
 * @since 2022-04-06
 */
public interface IAdminService extends IService<Admins> {

    RespBean login(String username, String password, String code, HttpServletRequest request);

    Admins getAdminByUserName(String username);

    //根据用户id查询角色列表
    List<Role> getRoles(Integer adminId);

    //获取所有操作员
    List<Admins> getAllAdmins(String ketwords);

    //更新操作员角色
    RespBean updateAdminRole(Integer adminId, Integer[] rids);

    //更新用户密码
    RespBean updatePassword(String oldPass, String pass, Integer adminId);

    }
